class Solution(object):
    def secondHighest(self, s):
        st = [0] * 10
        for c in s:
            if '0' <= c <= '9':
                st[int(c)] = 1
        index = 0
        for i in range(9, -1, -1):
            if st[i]:
                index += 1
                if index == 2:
                    return i
        return -1